package net.oschina.app.util;

import android.util.Log;

import net.oschina.app.Myapp;
import net.oschina.app.hjpbean.GeneralNewsBean;

import java.util.List;

import retrofit2.Callback;
import retrofit2.Response;

/**
 * Created by Admin on 2017/7/16.
 */

public class ZongHeGetShuJu {

    public List<GeneralNewsBean.NewsBean> rdList;


    public void ZXgetshuju() {

        retrofit2.Call<GeneralNewsBean> info = Myapp.shopService.getInfo(0, 1, 20);

        info.enqueue(new Callback<GeneralNewsBean>() {
            @Override
            public void onResponse(retrofit2.Call<GeneralNewsBean> call, Response<GeneralNewsBean> response) {

               rdList = response.body().getNewslist();

                Log.d("baima", rdList.get(15).getBody());



            }

            @Override
            public void onFailure(retrofit2.Call<GeneralNewsBean> call, Throwable t) {

                t.printStackTrace();

            }
        });
    }
}
